package UserClass;

import java.util.Scanner;

public class ScannerDemo {
    public static void main(String[] args) {
        System.out.println("请输入俩个数字");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数字");
        int i = scanner.nextInt();
        System.out.println("请输入第二个数字");
        int j =scanner.nextInt();
//     int result=   addSum(i,j);
//        System.out.println("所求的俩个数之和为:"+result);
        System.out.println("请输入第三个数字");
        int k =scanner.nextInt();
        int MaxResult=maxNum(i,j,k);
        System.out.println("三个数的最大值"+MaxResult);
    }
    public static  int addSum(int i,int j){
        int sum =i+j;
        return sum;
    }
    public static  int maxNum(int i,int j,int k){
        int model=i>j?i:j;
        int max=model>k?model:k;
        return  max;
    }
}
